//
//  SMHLoginViewController.swift
//  SMHCommerce
//
//  Created by lvzhao on 2020/1/6.
//  Copyright © 2020 lvzhao. All rights reserved.
//

import UIKit

class SMHLoginViewController: LZBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        view.backgroundColor = UIColor.white
        
        setupUI()
        // Do any additional setup after loading the view.
    }
    
    
    func setupUI() {
        
        
        
        ///logoApp
        let imageView = UIImageView.init(image: UIImage.init(named: "icon_app_logo"))
        view.addSubview(imageView)
        imageView.cornerRadius(cornerRadius: 6)
        imageView.snp.makeConstraints { (make) in
            make.centerX.equalTo(self.view.snp.centerX)
            make.top.equalTo(10)
            make.width.height.equalTo(100)
        }
        
        ///logoName
        let logoName = UILabel.init()
        logoName.textColor = .black;
        logoName.text = "速卖货"
        logoName.textAlignment = .center
        logoName.font = ktextBoldFont(size: 21)
        view.addSubview(logoName)
        logoName.snp.makeConstraints { (make) in
            make.centerX.equalTo(imageView.snp.centerX)
            make.width.equalTo(200)
            make.height.equalTo(20)
            make.top.equalTo(imageView.snp.bottom).offset(10)
        }
        
        ///手机号码
        let accountView = SMHAccountView()
        accountView.placeholder = "请输入手机号码";
        view.addSubview(accountView)
        accountView.snp.makeConstraints { (make) in
            make.centerX.equalTo(self.view.snp.centerX)
            make.top.equalTo(logoName.snp.bottom).offset(40)
            make.width.equalTo(kScreenWidth - 30)
            make.height.equalTo(50)
        }
        
        
        ///登录密码
        let passwrodView = SMHAccountView()
        passwrodView.placeholder = "请输入登录密码";
        view.addSubview(passwrodView)
        passwrodView.snp.makeConstraints { (make) in
            make.centerX.equalTo(self.view.snp.centerX)
            make.top.equalTo(accountView.snp.bottom).offset(5)
            make.width.equalTo(kScreenWidth - 30)
            make.height.equalTo(50)
        }
        
        
        ///登录
        let logBtn = UIButton.init(type: .custom)
        logBtn.setTitle("登录", for: .normal)
        logBtn.setTitleColor(UIColor.white, for: .normal)
        logBtn.titleLabel?.font = ktextFont(size: 18)
        view.addSubview(logBtn)
        logBtn.snp.makeConstraints { (make) in
            make.centerX.equalTo(self.view.snp.centerX)
            make.top.equalTo(passwrodView.snp.bottom).offset(30)
            make.width.equalTo(kScreenWidth - 30)
            make.height.equalTo(45)
        }
        
        logBtn.layoutViewGradient(style: .ViewGradientStyleLeft, colors: nil)
        logBtn.clipRectCorner(direction: .allCorners, cornerRadius: 6)
        
        ///注册
        
        
        ///忘记密码
        
        
        
        
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
